package com.kotlin.usermodel.data.repository

import com.kotlin.baselibrary.data.net.RetrofitFactory
import com.kotlin.baselibrary.data.protocol.BaseResponse
import com.kotlin.usermodel.data.api.UserApi
import com.kotlin.usermodel.data.protocol.RegisterRequest
import io.reactivex.Observable
import javax.inject.Inject

/**
 * @author       zhipe
 * @createTime    2020/10/12
 * @description
 */
class UserRepository @Inject constructor(){
    fun register(
        phoneNumber: String,
        pwd: String,
        verifyCode: String
    ): Observable<BaseResponse<Boolean>> {
        return RetrofitFactory.instance.create(UserApi::class.java)
            .register(RegisterRequest(phoneNumber, pwd, verifyCode))

    }
}